//
//  MBProgressHUD+YTAdd.h
//  tesDemo02
//
//  Created by 拓客营 on 2022/3/21.
//

#import <MBProgressHUD/MBProgressHUD.h>

NS_ASSUME_NONNULL_BEGIN

// 统一的显示时长
#define kHudShowTime 1.5

@interface MBProgressHUD (YTAdd)

#pragma mark 在指定的view上显示hud
+ (void)showMessage:(nullable NSString *)message toView:(nullable UIView *)view;
+ (void)showSuccess:(nullable NSString *)success toView:(nullable UIView *)view;
+ (void)showError:(nullable NSString *)error toView:(nullable UIView *)view;
+ (void)showWarning:(nullable NSString *)Warning toView:(nullable UIView *)view;
+ (void)showMessageWithImageName:(nullable NSString *)imageName message:(nullable NSString *)message toView:(nullable UIView *)view;
+ (MBProgressHUD *)showLoadingMessage:(nullable NSString*)message view:(nullable UIView *)view;
+ (MBProgressHUD *)showProgressBarToView:(nullable UIView *)view;

#pragma mark 在window上显示hud
+ (void)showMessage:(nullable NSString *)message;
+ (void)showSuccess:(nullable NSString *)success;
+ (void)showError:(nullable NSString *)error;
+ (void)showWarning:(nullable NSString *)Warning;
+ (void)showMessageWithImageName:(nullable NSString *)imageName message:(nullable NSString *)message;
+ (MBProgressHUD *)showLoadingMessage:(nullable NSString*)message;

+ (void)showMessage:(nullable NSString *)message afterDelay:(NSTimeInterval)delay;

#pragma mark 移除hud
+ (void)hideHUDForView:(nullable UIView *)view;
+ (void)hideHUD;

@end

NS_ASSUME_NONNULL_END
